/**
 *Copyright (c) 2024 watereyes
 * safetymanagement is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */
package com.koron.hiddendanger.mapper;

import com.koron.hiddendanger.bean.HiddenDangerRectificationNotice;
import com.koron.hiddendanger.bean.HiddenDangerRectificationReport;
import com.koron.hiddendanger.bean.NoticeItem;
import com.koron.hiddendanger.bean.ReportItem;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface HiddenDangerRectificationMapper {

    String queryMaxCode(@Param("noticeCode") String noticeCode);

    Integer insertNotice(HiddenDangerRectificationNotice bean);

    Integer insertNoticeItem(@Param("itemList") List<NoticeItem> itemList);

    List<HiddenDangerRectificationNotice> getNoticeList(@Param("codes") String codes, @Param("corpCode") String corpCode, @Param("checkUnit") String checkUnit, @Param("inspectedUnitName") String inspectedUnitName,
                                                        @Param("start") Integer start, @Param("pageSize") Integer pageSize,@Param("keyword") String keyword,@Param("noticeCode") String noticeCode);

    Integer getNoticeCount(@Param("codes") String codes,@Param("corpCode") String corpCode, @Param("checkUnit") String checkUnit, @Param("inspectedUnitName") String inspectedUnitName,@Param("keyword") String keyword,@Param("noticeCode") String noticeCode);

    List<String> getNoticeId(@Param("idLists") List<String> idLists);

    Integer batchDeleteNotice(@Param("idLists") List<String> idLists);

    Integer batchDeleteNoticeItem(@Param("idLists") List<String> idLists);

    List<NoticeItem> getNoticeItem(@Param("noticeId") String noticeId);

    List<HiddenDangerRectificationNotice> getNoticeListByIds(@Param("noticeIds") List<String> noticeIds);

    List<String> getHiddenDangerDiscoveryId(@Param("noticeId") String noticeId);

    Integer insertReport(HiddenDangerRectificationReport report);

    Integer batchInsertReportItem(@Param("reportItemList") List<ReportItem> reportItemList);

    List<HiddenDangerRectificationReport> getReportList(@Param("codes") String codes
            ,@Param("corpCode") String corpCode, @Param("checkUnit") String checkUnit, @Param("start") Integer start, @Param("pageSize") Integer pageSize,@Param("reportName") String reportName,@Param("keyword") String keyword);

    Integer getReportCount(@Param("codes") String codes,@Param("corpCode") String corpCode, @Param("checkUnit")String checkUnit,@Param("reportName") String reportName,@Param("keyword") String keyword);

    List<ReportItem> getReportItem(@Param("reportId") String reportId);

    HiddenDangerRectificationNotice getNotice(@Param("id") String id);

    HiddenDangerRectificationReport getReport(@Param("id") String id);

    String getNoticeCode(@Param("hiddenDangerId") String hiddenDangerId);

    ReportItem getReportItemOne(@Param("reportId") String reportId, @Param("hiddenDangerId") String hiddenDangerId);

    /**
     * 修改整改报告照片
     *
     * @param reportItem
     * @return
     */
    Integer updateReportItem(ReportItem reportItem);

    Integer updateDangerNoticeCode(@Param("noticeCode") String noticeCode, @Param("idList")List<String> idList);

    List<String> getReportId(@Param("discoveryIdList") List<String> discoveryIdList);

    Integer batchDeleteReportItem(@Param("idLists") List<String> idLists);

    Integer batchDeleteReport(@Param("idLists") List<String> idLists);
}
